#ifndef ELECTIONREGISTRY_H_
#define ELECTIONREGISTRY_H_
#include <string>
#include <algorithm>
#include "ElectionCreator.h"
#include "ElectionBase.h"
#include "functions.h"

using namespace std;
class ElectionRegistry {
    public:
        ElectionRegistry();
        ~ElectionRegistry();
    public:
        int add( string name, ElectionCreator* ec );
        int size() const;
        ElectionBase* create( string type, set<string> candidates ) const;
        map<string,ElectionCreator*> get_creators() const;
        set<string> get_names() const;
    protected:
      map<string,ElectionCreator*>  creators;
};
#endif
